//
//  LAGMarkPoint.h
//  MapGisBusiness
//
//  Created by 罗亮富 on 2018/12/23.
//  Copyright © 2018年 Roen. All rights reserved.
//

#import <MapGisBusiness/MapGisBusiness.h>
#import "LAGPointData.h"
#import "LAGPointFile.h"

#define MAKR_POINT_JSON_EXTENSION @"mpt"

typedef enum {
    
    MarkPoint_TypeOrdinary = 0,
    MarkPoint_TypeAnnounce, //播报点
} MarkPoint_Type;

//标注点、兴趣点共用
@interface LAGMarkPoint : LAGPointData

/**
 从jsonPath创建初始化一个LAGMarkPoint实例
 
 @param jsonPath 如果jsonPath文件不存在，则创建一个空的jsonFilePath，保存的时候将会将信息保存到jsonFilePath
 @return non null
 */
+(nullable instancetype)markPointWithJsonAtPath:(NSString *)jsonPath;

@property (nullable, nonatomic,copy) NSString *identifier;
@property (nonatomic) MarkPoint_Type type;
@property (nonatomic, copy) NSString *jsonFilePath; //在从json初始化的时候，jsonFilePath要首先创建
@property (nonatomic, readonly) NSString *directory;
@property (nullable, nonatomic, readonly, copy) NSArray <LAGPointFile *> *attachements;

-(void)addAttachement:(LAGPointFile *)file;
-(void)removeAttachement:(LAGPointFile *)file;

-(void)saveToFile;

@end


